﻿using DimensionsHelper.LanguageService.Syntax;

namespace DimensionsHelper.LanguageService.Symbols;

/// <summary>
///     参数宏中的参数定义符号
/// </summary>
public sealed class MacroParameterSymbol : AbstractSymbol
{
    internal MacroParameterSymbol(string name, SyntaxLocation location, MacroSymbol containingSymbol,
        bool isVaArgs) :
        base(SymbolKinds.MacroParameter)
    {
        Name = isVaArgs ? "__VA_ARGS__" : name;
        LocationMap.AddLocation(location);
        ContainingSymbol = containingSymbol;
        IsVaArgs = isVaArgs;
    }

    public override string Name { get; }

    public override MacroSymbol ContainingSymbol { get; }

    public override bool CanMakeArray => false;

    public bool IsVaArgs { get; }
}